/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-09-22
 * Time: 11:39
 */
//线程的状态
public class Demo10 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(() ->{
               System.out.println("T");
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });

        System.out.println(t.getState());
        t.start();

        System.out.println(t.getState());

        Thread.sleep(3000);
        System.out.println(t.getState());

        t.join();
        System.out.println(t.getState());

    }
}
